<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button>点我一</button>
    <button>点我二</button>
</body>
<script>
    const btns = document.querySelectorAll("button");
	btns[0].onclick = function(){
		let num = 0;
		for(let i=0;i<999999999;i++){
			num+=Math.random();
        }
		console.log(num);
    }
	btns[1].onclick = function(){
		console.log("2")
    }
</script>
</html>